package com.sephiron.clocksynchronizer;

import android.os.Bundle;
import android.util.Log;

import com.nhn.android.maps.*;
import com.nhn.android.maps.maplib.NGeoPoint;
import com.nhn.android.maps.nmapmodel.NMapError;

public class CctvMapActivity extends NMapActivity {
	private final String API_KEY = "3e54f0e56b724d7f2b07e2d4aee26e4c";
	public final String TAG = "com.sephiron.android.clocksynchronizer.CctvMapActivity";
	NMapView mMapView;
	NMapController mMapController;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		// create map view
		mMapView = new NMapView(this);

		// set a registered API key for Open MapViewer Library
		mMapView.setApiKey(API_KEY);

		// set the activity content to the map view
		setContentView(mMapView);

		// initialize map view
		mMapView.setClickable(true);

		// use map controller to zoom in/out, pan and set map center, zoom level
		// etc.
		mMapController = mMapView.getMapController();
	}

	public void onMapInitHandler(NMapView mapView, NMapError errorInfo) {
		if (errorInfo == null) { // success
			mMapController.setMapCenter(new NGeoPoint(126.978371, 37.5666091),
					11);
		} else { // fail
			Log.e(TAG, "onMapInitHandler: error=" + errorInfo.toString());
		}
	}
}